-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch harakiri graceful signal in middlware and log debug info #15447
Conversation
bc0626f
to
bbe6e36
Compare
Requires ansible/awx-operator#1943 |
Can you explain to me what's happening with the |
this is just to limit depth of stack. When it passed w/o that was just a mile high and may be distracting when really you just want basically last few frames. We could just get the whole thing and not worry about any potential index error. |
bbe6e36
to
ed5401d
Compare
ed5401d
to
15c350f
Compare
new example with move to django-ansible-base
this is with contrived example of |
67e031d
to
7eb3de6
Compare
7eb3de6
to
34b686d
Compare
ansible/django-ansible-base#581 merged...hoping this will help these PR checks pass |
also need ansible/awx-operator#1943 |
Middleware is from django_ansible_base
34b686d
to
f793bda
Compare
Quality Gate passedIssues Measures |
SUMMARY
Requests that exceed a certain timeout can be killed by uwsgi
But it begs the question -- what were they doing?!
By configuring uwsgi harakiri to send a SIGABRT (signal 6) as a first "graceful" signal, we can catch it in middleware and log a message with the stack where code was executing (probably stuck) and more information about the request
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
inspired by getsentry/sentry-python#1783
May require update to uwisgi.ini in operator/any other installer that lays down uwsgi config if doesn't just use tools/ansible/roles/dockerfile/files/uwsgi.ini from here
Sample traceback:
(this was contrived by putting "time.sleep(300)" in the root view)